Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

519
Visualizações
Node.js 17.0.1 Gatsby error - "digital envelope routines::unsupported ... ERR_OSSL_EVP_UNSUPPORTED"

I am building a Gatsby site. I upgraded Node.js to v17.0.1, and when I run a build, there is an error:

Error: digital envelope routines::unsupported

opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'

If I downgrade it to v16, it works fine, and the build will be successful. How can I fix this?

From googling, this may be a similar issue: Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt #48

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

This might help. Add these scripts in the package.json file.

React:

"scripts": {
    "start": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts start",
    "build": "export SET NODE_OPTIONS=--openssl-legacy-provider && react-scripts build"
}

or

"scripts": {
    "start": "react-scripts --openssl-legacy-provider start",
    "build": "react-scripts --openssl-legacy-provider build",
}

Vue.js:

"scripts": {
    "serve": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
    "build": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
    "lint": "export NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service lint"
},

or

"scripts": {
    "serve": "vue-cli-service --openssl-legacy-provider serve",
    "build": "vue-cli-service --openssl-legacy-provider build",
    "lint": "vue-cli-service --openssl-legacy-provider lint"
},
over 4 years ago · Santiago Trujillo Relatório

0

Gatsby must be using an algorithm or key size that is no longer allowed by default with OpenSSL 3.0.

UPDATE ⚠️

This is most likely a webpack issue: https://github.com/webpack/webpack/issues/14532

They have since released a fix in version 5.61.0 : https://github.com/webpack/webpack/releases/tag/v5.61.0 , so updating webpack should also fix the problem.

A member of the webpack team has stated that they don't plan to back up the solution to webpack 4, so if you're on webpack 4, you may need to look at upgrading to webpack 5 first.


From the Node.js 17 announcement post :

If you encounter an ERR_OSSL_EVP_UNSUPPORTED error in your application with Node.js 17, it is likely that your application or a module you are using is trying to use an algorithm or key size that is no longer allowed by default with OpenSSL 3.0. Added a new command line option --openssl-legacy-provider , to fall back to the legacy provider as a workaround for these strict restrictions.

Running this in the terminal might look like this:

 node --openssl-legacy-provider ./node_modules/.bin/gatsby build

You can also pass this through the NODE_OPTIONS environment variable.

So if you want to continue using the npm script, you can change the build script to:

 // package.json { "scripts": { "build": "export NODE_OPTIONS=--openssl-legacy-provider; gatsby build" } }
over 4 years ago · Santiago Trujillo Relatório

0

Quick fix: Run this in a terminal inside your React project.

export NODE_OPTIONS=--openssl-legacy-provider
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda